using System;
using System.Web.Mvc;
using AutoMapper;
using WebApp.ModelService;
using WebApp.Services;

namespace WebApp.Controllers
{
    [Authorize]
    public class TaskLogController : SmartController
    {
        private readonly ITaskLogModelService _taskLogModelService;
        public TaskLogController(IUserSession userSession, IMappingEngine mappingEngine, ITaskLogModelService taskLogModelService)
            : base(userSession, mappingEngine)
        {
            _taskLogModelService = taskLogModelService;
        }

        public ActionResult Index()
        {
            var response = _taskLogModelService.GetPageBySpecification();
            return View(response);
        }

        public ActionResult Show(Guid id)
        {
            var response = _taskLogModelService.GetTaskLogDetailById(id);
            return View(response);
        }
    }
}